import java.util.Scanner;
public class Main{
    public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        String b = sc.next();
        int c = sc.nextInt();

        switch(b.charAt(0)){
            case '&':
                System.out.printf(a + " " + b + " " + c + " = " + (a&c));
                break;
            case '|':
                System.out.printf(a + " " + b + " " + c + " = " + (a|c));
                break;
            case '^':
                System.out.printf(a + " " + b + " " + c + " = " + (a^c));
                break;
            default:
                System.out.printf("ERROR");
        }
    }
}